{include file="public/head"/}
  
  <body>
    <div class="x-body">
        <form class="layui-form" action="{:url('deviceAdd')}" method="post" enctype="multipart/form-data">
            <div class="layui-form-item">
                <label for="L_email" class="layui-form-label">
                    <span class="x-red">*</span>所属小区
                </label>
                <div class="layui-input-inline" style="text-align: left; width:300px;">
                    <select id="community_id" name="community_id">
                        <option value="" selected="true">请选择小区</option>
                        {foreach $community as $comm}
                        <option value="{$comm.id}">{$comm.name}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"><span class="x-red">*</span>门锁类型</label>
                <div class="layui-input-block">
                    <input type="radio" lay-skin="primary" value="1" title="小区" lay-filter="xq" name="devicetype">
                    <input type="radio" lay-skin="primary" value="2" title="单元门" lay-filter="ld" name="devicetype">
                    <input type="radio" lay-skin="primary" value="3" title="电梯门"  name="devicetype">
                   
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"><span class="x-red">*</span>进出类型</label>
                <div class="layui-input-block">
                    <input type="radio" lay-skin="primary" value="1" title="进" lay-filter="xq" name="access_type">
                    <input type="radio" lay-skin="primary" value="2" title="出" lay-filter="ld" name="access_type">
                   
                </div>
            </div>
            <div class="layui-form-item">
                <label for="devicename" class="layui-form-label">
                    <span class="x-red">*</span>门禁名称:
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="devicename" name="devicename" required="" lay-verify="required"
                    autocomplete="off" class="layui-input"  style="width: 300px;">
                </div>
            </div>

            <div class="layui-form-item">
                <label for="username" class="layui-form-label">
                    <span class="x-red">*</span>序列号:
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="devicekey" name="devicekey" required="" lay-verify="required"
                    autocomplete="off" class="layui-input"  style="width: 300px;">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="group" class="layui-form-label">
                    <span class="x-red">*</span>组团:
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="group" name="group" 
                    autocomplete="off" class="layui-input"  style="width: 300px;">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="building" class="layui-form-label">
                    <span class="x-red">*</span>楼栋:
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="building" name="building" 
                    autocomplete="off" class="layui-input"  style="width: 300px;">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="unit" class="layui-form-label">
                    <span class="x-red">*</span>单元:
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="unit" name="unit" 
                    autocomplete="off" class="layui-input"  style="width: 300px;">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_repass" class="layui-form-label">
                </label>
                <button  class="layui-btn" lay-filter="add" lay-submit="">
                    添加门禁
                </button>
            </div>
        </form>
    </div>
    
    </body>
</html>